package com.cas;

import com.cas.netty.NettyServer;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class NettyMain implements CommandLineRunner {
    @Resource
    private NettyServer nettyServer;

    @Override
    public void run(String... args) {
        Thread nettyThread = new Thread(() -> {
            nettyServer.serverRun();
        });
        nettyThread.start();
    }
}
